package com.maimao.upload.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.model.user.sys.vo.Permissions;
import com.maimao.upload.client.fallback.BrandFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author MaoLin Wang
 * @date 2020/11/30 9:45 下午
 */
@FeignClient(value = ServiceContainer.GOODS_SERVICE,fallbackFactory = BrandFallBackFactory.class,configuration = FeignInterceptor.class)
public interface BrandClient {

    @RequestMapping("/goods/brand/logo")
     Result<String> findLogoById(@RequestParam("id") Integer id);

    /**
     * 修改logo地址
     *  key：logo value:logo地址
     *  key：id  value: 品牌id
     */
    @PostMapping("/goods/brand/update/logo")
    Result<Void> updateLogo(@RequestBody Map<String,String> data);

}
